import java.util.Scanner;

class 学生成绩分级 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String grade = scanner.next();
/*
        //write your code here......
        if (grade.equals("A"))
            System.out.println("优秀");
        else if (grade.equals("B"))
            System.out.println("良好");
        else if (grade.equals("C"))
            System.out.println("及格");
        else if (grade.equals("D"))
            System.out.println("不及格");
        else
            System.out.println("未知等级");
*/
        switch (grade){
        case "A": System.out.println("优秀");
             break;
        case "B": System.out.println("良好");
            break;
        case "C": System.out.println("及格");
            break;
        case "D": System.out.println("不及格");
            break;
            default:
        System.out.println("未知等级");}
    }
}
